//
//  IllustrationController.m
//  Hai
//
//  Created by wangzijian on 16/6/13.
//  Copyright (c) 2016年 wangzijian. All rights reserved.
//

#import "SexRegController.h"
#import "RegisterController.h"
@interface SexRegController ()

@end

@implementation SexRegController{
    
}
- (void)viewDidLoad {
    [super viewDidLoad]; 
    _danxuan1.selected = YES;
    [_danxuan1 setImage:[UIImage imageNamed:@"check_no"] forState:UIControlStateNormal];
    [_danxuan1 setImage:[UIImage imageNamed:@"check_yes"] forState:UIControlStateSelected];
    [_danxuan1 addTarget:self action:@selector(checkboxClick1) forControlEvents:UIControlEventTouchUpInside];
    _danxuan2.selected = NO;
    [_danxuan2 setImage:[UIImage imageNamed:@"check_no"] forState:UIControlStateNormal];
    [_danxuan2 setImage:[UIImage imageNamed:@"check_yes"] forState:UIControlStateSelected];
    
    [_danxuan2 addTarget:self action:@selector(checkboxClick2) forControlEvents:UIControlEventTouchUpInside];
}

- (void)viewWillAppear:(BOOL)animated{
    self.navigationController.navigationBarHidden=NO;
    [ super viewWillAppear:animated];
}
  -(void)checkboxClick1
{
    if (!_danxuan1.selected) {
        _danxuan1.selected = YES;
        _danxuan2.selected = NO;
        
    }
    
}
-(void)checkboxClick2
{
    if (!_danxuan2.selected) {
        _danxuan1.selected = NO;
        _danxuan2.selected = YES;
    }
    
}
-(IBAction)next{
    RegisterController *l = [[RegisterController alloc] init];
    [self.navigationController pushViewController:l animated:YES];
}
@end